
/*****************************************************************************
 *
 * 作   者: 罗美霞 * 创建时间: 2020/12/11 10:22:15 *
 * Copyright (C) 2008 - 鹏业软件公司
 *
 *****************************************************************************/

import {DataPacket, NorDataList} from 'pengesoft-ng-lib';

/**
 * 部门
 */
export class Dept extends DataPacket {
  Id: string; // id
  Pid: string; // 父部门id
  DeptName: string; // 部门名称
  DeptPerson: string; // 部门负责人
  DeptPhone: string; // 负责人联系方式

  constructor(options: {
    Id?: string;
    Pid?: string;
    DeptName?: string;
    DeptPerson?: string;
    DeptPhone?: string;
  } = {}) {
    super();
    this.Id = options.Id || '';
    this.Pid = options.Pid || '';
    this.DeptName = options.DeptName || '';
    this.DeptPerson = options.DeptPerson || '';
    this.DeptPhone = options.DeptPhone || '';
  }
}

/**
 * 部门列表
 */
export class DeptList extends NorDataList<Dept> {

  constructor(options: {
    _Items?: Array<Dept>
  } = {}) {
    super();
    if (options._Items) {
      for (const item of options._Items) {
        this.append(new Dept(item));
      }
    }
  }
}

export class Department {
}
